<link rel="stylesheet" type="text/css" href="css/header.css"/>
 <!--头部-->
<div id="app" class="header_wrap">			
	<ul>		
		
		<span  v-if="  name == ''  " >
		   <li><a href="/meilishuo/denglu.html" target="_parent">登录</a></li>
		   <li><a href="/meilishuo/zhuce.html"  target="_parent">注册</a></li>
		</span>
		<span v-else>
		   <li>欢迎尊敬的用户:<a href="/meilishuo/jump/toUserhome" target="_parent">{{name}}</a></li>
		</span>
		<li><a href="/meilishuo/jump/toCar" target="_parent">我的购物车</a></li>
		<li><a href="#">我的订单</a></li>
		<li><a href="#">帮助中心</a></li>
		<li><a href="#">商家后台</a></li>
	</ul>
</div>

<script type="text/javascript" src="/meilishuo/js/jq.js"></script>
<script type="text/javascript" src="/meilishuo/js/vue.js"></script>
<script type="text/javascript" >
       // 主动发送请求  获取后台用户登录信息
       $.get("/meilishuo/user/getUser",function(backData){
    	      if(backData.code == 10015) {
    	    	  //{"code":10015,"data":{"uid":8,"password":"123","nickname":"测试用户","telephone":"123","email":"123123@qq.com"},"msg":"获取成功"}
    	    	  app.name = backData.data.nickname;
    	      }
       });
       var app = new Vue({
	         el:"#app",
	         data:{
                 name:""
	         },
	         methods:{}
        });

</script>